{__NOLAYOUT__}
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title></title>
	{include file="public/script" /}
</head>
<body>
	<div class="sectionH sectionH2 mui-clearfix">
		<header class="mui-bar mui-bar-nav" style="">
			<a class="mui-icon mui-icon-left-nav  mui-pull-left" href="javascript:history.back(-1)" style="color: #727272;"></a>
			<h1 class="mui-title">商会会员</h1>
			<!--<a class="mui-icon mui-pull-right right1" href="javascript:;" style="padding-top: 10px;"><img src="images/nav_icon_search.png"/></a>-->
		</header>
	</div>
	<div class="kong1"></div>
	<div class="shanghui_lingdao_section1" id="items">
		<div class="container" style="position: absolute;width: 100%;z-index: 1;">
			<div class="items" style="position: relative;">
				{volist name="list" id="member"}
				<div class="lingdao1">

					<div class="items_1 mui-clearfix" style="height: 5.5rem;">
						<a href="{:url('Bussiness/memberInfo',array('id'=>$member.id))}">
						    <div class="div1" style="margin-top: 0.5rem">
								<img style="width: 3.5rem;height: 3.5rem;" src="{$member.avatar|default='/static/default_avatar.png'}" alt="" />
						    </div>
						</a>
						<div class="div2">
							<p class="p1"><span class="s1">{$member.real_name}</span> <span class="s2">{$member.title}</span></p>
							<p id="hide_mobile" class="p2">{$member.mobile|hide_mobile}</p>
							<p class="p2">加入时间：{$member.create_time|date='Y-m-d',###}</p>
						</div>
						<div class="div3" style="margin-top:1.25rem;">
							<a href="{:url('Chat/message',['getid'=>$member.id])}"><img style="width:2rem;height:2rem;" src="__STATIC__/www/images/co_send_icon_message.png"/></a>
						</div>
					</div>
				</div>
                {/volist}
				
			</div>
		</div>
	</div>




</body>
<script>
    mui.init({
        pullRefresh: {
            container: '#items',
            down: {

            },
            up: {
                auto:false,
                contentrefresh: '正在加载...',
                callback: pullupRefresh
            }
        }
    });
    var count = 1;
    function pullupRefresh() {
        setTimeout(function() {
            // mui('#items').pullRefresh().endPullupToRefresh((++count > 2)); //参数为true代表没有更多数据了。
            var table = document.body.querySelector('.items');
            var url="{:url('Bussiness/memberList',array('id'=>$bussiness_id))}";
            count++;
            $.post(url,{page:count,page_size:10},function(data){
                var data=JSON.parse(data);
                if(data==0)
                {
                    mui('#items').pullRefresh().endPullupToRefresh((data==0));
                }else{
                    for (var i = 0; i < data.length; i++) {
                        var url2 = '/Chat/message/getid/'+data[i]['id'];
                        if(data[i]["avatar"]==''){
                            data[i]["avatar"]='/static/default_avatar.png';
                        }
                        var li = document.createElement('div');
                        var url1="/Bussiness/memberInfo/id/"+data[i]['id'];
                        li.className = 'lingdao1';
                        li.innerHTML = '<div class="items_1 mui-clearfix" style="height: 5.5rem;">\n' +
                            '\t\t<a href="'+url1+'"><div class="div1" style="margin-top: 0.5rem">\n' +
                            '\t\t\t<img src="'+data[i]['avatar']+'" alt="" style="width: 3.5rem;height: 3.5rem;" />\n' +
                            '\t\t</div></a>\n' +
                            '\t\t<div class="div2">\n' +
                            '\t\t\t<p class="p1"><span class="s1">'+data[i]['real_name']+'</span> <span class="s2">'+data[i]["title"]+'</span></p>\n' +
                            '\t\t\t<p class="p2">'+hide_mobile(data[i]['mobile'])+'</p>\n' +
                            '\t\t\t<p class="p2">'+DateToTime(data[i]['create_time'],'Y-m-d')+'</p>\n' +
                            '\t\t</div>\n' +
                            '\t\t<div class="div3" style="margin-top:1.25rem;">\n' +
                            '\t\t\t<a href="'+url2+'"><img style="width:2rem;height:2rem;" src="__STATIC__/www/images/co_send_icon_message.png"/></a>\n' +
                            '\t\t</div>\n' +
                            '\t</div>';
                        table.appendChild(li);

                    }

                }
                mui('#items').pullRefresh().endPullupToRefresh((data==0));
            })

        }, 1000);
    }
    function hide_mobile(mobile) {

        var mtel = mobile.substr(0, 3) + '****' + mobile.substr(7);
        return mtel;
    }



</script>
</html>